﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace JQAutoUpdate
{
    class Logger
    {
        public static string Prepare()
        {
            string fileName = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory,"Logs",$"{DateTime.Now.ToShortDateString()}.txt");
            if(System.IO.File.Exists(fileName))
            {
                File.Create(fileName);
            }
            return fileName;
        }

        public static void Info(string msg)
        {
            string path = Prepare();
            string format = $"{DateTime.Now.ToString()}";
            File.AppendAllText(path,msg);
        }

    }
}
